package com.gomtel.smartdevice.moudle.rxtools;

import com.gomtel.smartdevice.moudle.event.CommonEvent;

import org.greenrobot.eventbus.EventBus;

/**
 * Created by Administrator on 2018/5/28 0028.
 */

public class EventBusUtil {

    public static void register(Object subscriber) {
        EventBus.getDefault().register(subscriber);
    }

    public static void unregister(Object subscriber) {
        EventBus.getDefault().unregister(subscriber);
    }

    public static void sendEvent(CommonEvent event) {
        EventBus.getDefault().post(event);
    }

    public static void sendStickyEvent(CommonEvent event) {
        EventBus.getDefault().postSticky(event);
    }

}
